package com.zp.self.module.level_5_设计模式.行为型模式.Ⅶ_中介者模式;

import java.util.List;

/**
 * @author ：by Zeng Peng
 * @date ：Created 2022/7/4 21:26
 * @description ：
 */
public class QQTarget extends AbstractTarget{
    public QQTarget(Mediator mediator, String userName) {
        super(mediator, userName);
    }

    @Override
    void send(List<String> userNames, String msg) {
        System.out.println("QQ用户:"+getUserName()+"发送消息："+msg);
        getMediator().forwardMessage(userNames,msg);
    }

    @Override
    void receive(String msg) {
        System.out.println("QQ用户:"+getUserName()+"接收到了消息："+msg);
    }
}
